home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 2003 May (DVD) / Macworld Resource DVD May 2003.toast / Data / Software / Bonus / Database / mysql-max-3.23.55.sit / mysql-max-3.23.55-apple-darwi.1 / mysql-test / t / bdb-crash.test < prev    next >
Encoding:
Text File  |  2003-01-21  |  997 b   |  37 lines  |  [TEXT/ttxt]

  1. -- source include/have_bdb.inc
  2.  
  3. # test for bug reported by Mark Steele
  4.  
  5. drop table if exists t1;
  6. CREATE TABLE t1 (
  7.   ChargeID int(10) unsigned DEFAULT '0' NOT NULL auto_increment,
  8.   ServiceID int(10) unsigned DEFAULT '0' NOT NULL,
  9.   ChargeDate date DEFAULT '0000-00-00' NOT NULL,
  10.   ChargeAmount decimal(20,2) DEFAULT '0.00' NOT NULL,
  11.   FedTaxes decimal(20,2) DEFAULT '0.00' NOT NULL,
  12.   ProvTaxes decimal(20,2) DEFAULT '0.00' NOT NULL,
  13.   ChargeStatus enum('New','Auth','Unauth','Sale','Denied','Refund')
  14. DEFAULT 'New' NOT NULL,
  15.   ChargeAuthorizationMessage text,
  16.   ChargeComment text,
  17.   ChargeTimeStamp varchar(20),
  18.   PRIMARY KEY (ChargeID),
  19.   KEY ServiceID (ServiceID),
  20.   KEY ChargeDate (ChargeDate)
  21. ) type=BDB;
  22.  
  23. BEGIN;
  24. INSERT INTO t1
  25. VALUES(NULL,1,'2001-03-01',1,1,1,'New',NULL,NULL,'now');
  26. COMMIT;
  27.  
  28. BEGIN;
  29. UPDATE t1 SET ChargeAuthorizationMessage = 'blablabla' WHERE
  30. ChargeID = 1;
  31. COMMIT;
  32.  
  33. INSERT INTO t1
  34. VALUES(NULL,1,'2001-03-01',1,1,1,'New',NULL,NULL,'now');
  35. select * from t1;
  36. drop table t1;
  37.